var page_index = 1; /* 当前页数 */
var pages = 0; /* 总页数 */
var load_leng = 1200; /* 加载长度 */
var search_type = "information"; /* 搜索类型 */

$(document).ready(function() {
	get_user_mess_and_token();
	var url = location.search;
	solr_content = url.substr(1);
	solr_content = decodeURI(solr_content);
	if (solr_content != null && solr_content.trim().length != 0) {
		$("#search_input").css("color", "black");
		$("#search_input").val(solr_content);
	}
	$("[name='solr_content']").text(solr_content);

	/* 默认搜索相关资讯 */
	search_relevant_information(true);
	/* 查询销量排行榜 */
	select_sales_all_series();

	/* 更改页面路径 */
	$(".to_login").attr("href", "http://127.0.0.1:8899/html/car_login.html?car_search/" +
		solr_content);
});

/* 搜索相关资讯 */
function search_relevant_information(whether_default_search) { //true：默认搜索，false：指定搜索
	$("#search_type li:eq(0)").attr("class", "jsx-1121528706 active").siblings("li").attr("class",
		"jsx-1121528706");
	$.post("http://127.0.0.1:8899/api/consumer/InformationController/select_information_by_solr/" + solr_content + "/" +
		page_index,
		function(data) {
			pages = data.pages;
			if (whether_default_search && data.result.length == 0) { //默认搜索下一个(找车)
				search_relevent_car_series(true);
			}
			if (!whether_default_search && data.result.length == 0) {
				$("#no_search_data").show();
				$("#all_search_data").hide();
			} else {
				$("#no_search_data").hide();
				$("#all_search_data").show();
			}
			var all_relevant_information_data =
				"<div><section data-log-view-config=\"{&quot;repeated&quot;:true}\" data-log-view=\"false\" class=\"jsx-2478098219 scroll-loader-wrap tw-grid tw-grid-cols-4 lg:tw-grid-cols-3 tw-gap-x-14 tw-gap-y-40\">";
			$(data.result).each(function(index, item) {
				all_relevant_information_data += "<div class=\"common-card_wrapper__Inr_n\"> " +
					"<div> " +
					"<div class=\"tw-relative tw-text-common-black\" style=\"font-size:0\"><a " +
					"href=\"http://127.0.0.1:8899/html/car_information_details.html?" + item
					.information_id + "/0" + "\" target=\"_blank\" " +
					"class=\"jsx-1095092229\"> " +
					"<div style=\"display:block;overflow:hidden;position:relative;z-index:0\" " +
					"class=\"tw-rounded-4 g-load-img-wrap\"> " +
					"<div " +
					"style=\"display:block;box-sizing:border-box;padding-top:56.00000000000001%\"> " +
					"</div><img src=\"http://120.48.47.144:8899/images/" + item.information_images_1 +
					"\" " +
					"alt=\"" + item.information_title + "\" width=\"250\" height=\"140\" " +
					"style=\"position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover\" /><img " +
					"src=\"\" " +
					"alt=\"" + item.information_title + "\" width=\"250\" " +
					"height=\"140\" " +
					"style=\"position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover\" " +
					"class=\"zoom\" /> " +
					"</div> " +
					"</a> " +
					"<div class=\"jsx-1904556275 author-avatar_avatar-wrap__1pWQN\"> " +
					"<div class=\"jsx-2217341492 avatar_avatar-img__170Bh tw-text-0\"><a " +
					"href=\"http://127.0.0.1:8899/html/car_my_homepage.html?" + item.user_id +
					"\" title=\"" + item.user_name + "\" target=\"_blank\"> " +
					"<div style=\"display:inline-block;max-width:100%;overflow:hidden;position:relative;z-index:0\" " +
					"class=\"avatar tw-rounded-full\"> " +
					"<div style=\"box-sizing:border-box;display:block;max-width:100%\"> " +
					"<img style=\"max-width:100%;display:block;margin:0;border:none;padding:0\" " +
					"src=\"data:image/svg+xml;utf-8,&lt;svg width=&quot;40&quot; height=&quot;40&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.1&quot;/&gt;\" " +
					"aria-hidden=\"true\" role=\"presentation\" /></div> " +
					"<noscript><img " +
					"src=\"http://120.48.47.144:8899/images/" + item.user_head_portrait_url + "\" " +
					"alt=\"" + item.user_name + "\" width=\"40\" height=\"40\" " +
					"style=\"position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover\" /></noscript><img " +
					"src=\"http://120.48.47.144:8899/images/" + item.user_head_portrait_url + "\" " +
					"alt=\"" + item.user_name + "\" width=\"40\" height=\"40\" " +
					"style=\"position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover\" /> " +
					"</div> " +
					"</a></div> " +
					"<p title=\"" + item.user_name + "\" " +
					"class=\"jsx-1904556275 author-avatar_name__3ex3- name line-1\"><a " +
					"href=\"http://127.0.0.1:8899/html/car_my_homepage.html?" + item.user_id +
					"\" title=\"" + item.user_name + "\" " +
					"target=\"_blank\">" + item.user_name + "</a></p> " +
					"</div> " +
					"</div> " +
					"<h3 " +
					"class=\"tw-leading-22 tw-text-16 tw-font-medium tw-text-common-black tw-text-justify line-2 g-active-link-text tw-mt-36\"> " +
					"<a href=\"http://127.0.0.1:8899/html/car_information_details.html?" + item
					.information_id + "/0" + "\" target=\"_blank\" " +
					"class=\"jsx-1095092229\">" + item.information_title + "</a></h3> " +
					"<p class=\"tw-mt-8 tw-h-20 tw-lead tw-text-common-gray tw-text-14\"><a href=\"http://127.0.0.1:8899/html/car_information_details.html?" +
					item
					.information_id + "/0" + "\" target=\"_blank\" " +
					"class=\"jsx-1095092229\"><span class=\"tw-mr-8\">" + item.information_read_count +
					" " +
					"次阅读</span><span>" + item.information_release_date + "</span></a></p> " +
					"</div> " +
					"</div>";
			});
			all_relevant_information_data += "</section></div>";
			$("[name='solr_content']").next().text("的相关资讯");
			$("#all_search_data").append(all_relevant_information_data);
		}, "json");
}

/* 搜索相关车系 */
function search_relevent_car_series(whether_default_search) {
	$("#search_type li:eq(1)").attr("class", "jsx-1121528706 active").siblings("li").attr("class", "jsx-1121528706");
	$.post("http://127.0.0.1:8899/api/consumer/Car_seriesController/select_car_series_by_solr/" + solr_content + "/" +
		page_index,
		function(data) {
			pages = data.pages;
			if (whether_default_search && data.result.length == 0) { //默认搜索下一个(视频)
				search_relevent_video(true);
			}
			if (!whether_default_search && data.result.length == 0) {
				$("#no_search_data").show();
				$("#all_search_data").hide();
			} else {
				$("#all_search_data").show();
				$("#no_search_data").hide();
			}
			var all_relevant_car_series_data = "<div> " +
				"<section data-log-view-config=\"{&quot;repeated&quot;:true}\" " +
				"data-log-view=\"{&quot;event&quot;:&quot;show_event&quot;,&quot;params&quot;:{&quot;event_id&quot;:&quot;aladdin_not_series_select_item_aladdin&quot;,&quot;module_id&quot;:&quot;aladdin_not_series_select_item_aladdin&quot;,&quot;page_id&quot;:&quot;page_search_result_new&quot;,&quot;search_req_id&quot;:&quot;202207111044380102080971032106BCD4&quot;,&quot;search_scene&quot;:&quot;video_program&quot;,&quot;rank&quot;:&quot;0&quot;,&quot;aladdin&quot;:&quot;&quot;,&quot;cell_type&quot;:&quot;100&quot;,&quot;cell_source&quot;:&quot;100&quot;,&quot;query_content&quot;:&quot;汽车&quot;,&quot;sub_tab&quot;:&quot;找车&quot;,&quot;car_series_id_list&quot;:&quot;289,393,4363,1145,96&quot;}}\" " +
				"class=\"jsx-2478098219 scroll-loader-wrap tw-grid tw-grid-cols-5 tw-gap-x-8 tw-gap-y-12\">";
			$(data.result).each(function(index, item) {
				all_relevant_car_series_data +=
					"<div data-log-click=\"{&quot;event&quot;:&quot;clk_event&quot;,&quot;params&quot;:{&quot;event_id&quot;:&quot;aladdin_not_series_select_item_aladdin&quot;,&quot;module_id&quot;:&quot;aladdin_not_series_select_item_aladdin&quot;,&quot;page_id&quot;:&quot;page_search_result_new&quot;,&quot;search_req_id&quot;:&quot;202207111044380102080971032106BCD4&quot;,&quot;search_scene&quot;:&quot;video_program&quot;,&quot;rank&quot;:&quot;0&quot;,&quot;aladdin&quot;:&quot;&quot;,&quot;cell_type&quot;:&quot;100&quot;,&quot;cell_source&quot;:&quot;100&quot;,&quot;query_content&quot;:&quot;汽车&quot;,&quot;sub_tab&quot;:&quot;找车&quot;,&quot;car_series_id&quot;:&quot;289&quot;,&quot;car_series_name&quot;:&quot;雅阁&quot;}}\" " +
					"class=\"jsx-2082134125 card\"><a target=\"_blank\" href=\"http://127.0.0.1:8899/html/car_series_index.html?" +
					item.car_series_id + "\"> " +
					"<div class=\"jsx-2082134125 card-score\"> " +
					"<div class=\"jsx-2082134125 card-score__pic\"></div> " +
					"<div class=\"jsx-2082134125 card-score__text\">" + item.car_points_avg + "分</div> " +
					"</div> " +
					"<div class=\"jsx-2082134125 card-pic\"> " +
					"<div " +
					"style=\"display:inline-block;max-width:100%;overflow:hidden;position:relative;z-index:0\"> " +
					"<div style=\"box-sizing:border-box;display:block;max-width:100%\"> " +
					"<img style=\"max-width:100%;display:block;margin:0;border:none;padding:0\" " +
					"src=\"http://120.48.47.144:8899/images/" + item.car_series_images_url_1 + "\" " +
					"aria-hidden=\"true\" role=\"presentation\"></div> " +
					"<img src=\"http://120.48.47.144:8899/images/" + item.car_series_images_url_1 + "\" " +
					"width=\"108\" height=\"72\" " +
					"style=\"position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover\" /> " +
					"</div> " +
					"</div> " +
					"<div class=\"jsx-2082134125 card-name line-1\">" + item.car_series_name + "</div> " +
					"<div class=\"jsx-2082134125 card-price line-1\">" + item.min_manufacturer_price + "-" +
					item.max_manufacturer_price + "万</div> " +
					"</a><a target=\"_blank\" class=\"card-button\" rel=\"opener nofollow\" " +
					"href=\"http://127.0.0.1:8899/html/car_purchase_calculation.html?" + item
					.car_series_id + "/0" + "\"><button " +
					"type=\"button\" " +
					"data-log-click=\"{&quot;event&quot;:&quot;clk_event&quot;,&quot;params&quot;:{&quot;event_id&quot;:&quot;aladdin_not_series_select_item_aladdin_btn&quot;,&quot;module_id&quot;:&quot;aladdin_not_series_select_item_aladdin_btn&quot;,&quot;page_id&quot;:&quot;page_search_result_new&quot;,&quot;search_req_id&quot;:&quot;202207111044380102080971032106BCD4&quot;,&quot;search_scene&quot;:&quot;video_program&quot;,&quot;rank&quot;:&quot;0&quot;,&quot;aladdin&quot;:&quot;&quot;,&quot;cell_type&quot;:&quot;100&quot;,&quot;cell_source&quot;:&quot;100&quot;,&quot;query_content&quot;:&quot;汽车&quot;,&quot;sub_tab&quot;:&quot;找车&quot;,&quot;car_series_id&quot;:&quot;289&quot;,&quot;car_series_name&quot;:&quot;雅阁&quot;,&quot;button_name&quot;:&quot;询底价&quot;}}\" " +
					"class=\"jsx-2082134125 card-button\">购车计算</button></a> " +
					"</div>";
			});
			all_relevant_car_series_data += "</section></div>";
			$("[name='solr_content']").next().text("的相关车系");
			$("#all_search_data").append(all_relevant_car_series_data);
		}, "json");
}

/* 搜索相关视频 */
function search_relevent_video(whether_default_search) {
	$("#search_type li:eq(2)").attr("class", "jsx-1121528706 active").siblings("li").attr("class", "jsx-1121528706");
	$.post("http://127.0.0.1:8899/api/consumer/VideoController/select_video_by_solr/" + solr_content + "/" +
		page_index,
		function(data) {
			pages = data.pages;
			if (whether_default_search && data.result.length == 0) { //所有搜索都没有
				$("#search_type li:eq(0)").attr("class", "jsx-1121528706 active").siblings("li").attr("class",
					"jsx-1121528706");
				$("#no_search_data").show();
				$("#all_search_data").hide();
				$("[name='solr_content']").next().text("的相关资讯");
				return;
			}
			if (!whether_default_search && data.result.length == 0) {
				$("#no_search_data").show();
				$("#all_search_data").hide();
			} else {
				$("#no_search_data").hide();
				$("#all_search_data").show();
			}
			var all_relevent_video_data =
				"<div><section data-log-view-config=\"{&quot;repeated&quot;:true}\" data-log-view=\"{&quot;event&quot;:&quot;show_event&quot;,&quot;params&quot;:{&quot;event_id&quot;:&quot;aladdin_feed_group_card&quot;,&quot;module_id&quot;:&quot;&quot;,&quot;page_id&quot;:&quot;page_search_result_new&quot;,&quot;search_req_id&quot;:&quot;202207111158480102080480921A0CF5F0&quot;,&quot;search_scene&quot;:&quot;video_program&quot;,&quot;rank&quot;:&quot;0&quot;,&quot;aladdin&quot;:&quot;&quot;,&quot;cell_type&quot;:&quot;202&quot;,&quot;cell_source&quot;:&quot;202&quot;,&quot;query_content&quot;:&quot;汽车&quot;,&quot;sub_tab&quot;:&quot;视频&quot;,&quot;group_id_list&quot;:&quot;7076247839638028834,7110875297922155039,7117814948364976671&quot;}}\" class=\"jsx-2478098219 scroll-loader-wrap tw-grid tw-grid-cols-4 lg:tw-grid-cols-3 tw-gap-x-14 tw-gap-y-40\">";
			$(data.result).each(function(index, item) {
				all_relevent_video_data += "<div class=\"common-card_wrapper__Inr_n\"><div> " +
					"<div class=\"tw-relative tw-text-common-black\" style=\"font-size: 0px;\"><a href=\"http://127.0.0.1:8899/html/car_video_broadcast.html?" +
					item
					.video_id + "\" target=\"_blank\" " +
					"class=\"jsx-1095092229\" rel=\"opener\"> " +
					"<div class=\"tw-rounded-4 g-load-img-wrap\" " +
					"style=\"display: block; overflow: hidden; position: relative; z-index: 0;\"> " +
					"<div " +
					"style=\"display: block; box-sizing: border-box; padding-top: 56%;\"> " +
					"</div><img " +
					"src=\"http://120.48.47.144:8899/images/" + item.video_images_url + "\" " +
					"alt=\"" + item.video_introduction + "\" width=\"250\" height=\"140\" class=\"zoom\" " +
					"style=\"position: absolute; inset: 0px; box-sizing: border-box; padding: 0px; border: none; margin: auto; display: block; width: 0px; height: 0px; min-width: 100%; max-width: 100%; min-height: 100%; max-height: 100%; object-fit: cover;\"> " +
					"</div> " +
					"<div " +
					"class=\"tw-w-50 tw-h-20 tw-flex tw-items-center tw-justify-center tw-rounded-2 tw-bg-black tw-bg-opacity-80 tw-text-white tw-text-12 tw-absolute tw-right-8 tw-bottom-8 tw-z-10\"> " +
					"<span class=\"font-size-10_wrapper__pmvsT undefined\" " +
					"style=\"width: 44px; height: 10px;\"><span " +
					"class=\"font-size-10_inner__y3DQ4\"><i " +
					"class=\"DCD_Icon icon_play_1 tw-text-16 tw-mr-2\"></i>" + item.video_duration +
					"</span></span> " +
					"</div> " +
					"</a> " +
					"<div class=\"jsx-1904556275 author-avatar_avatar-wrap__1pWQN\"> " +
					"<div class=\"jsx-2217341492 avatar_avatar-img__170Bh tw-text-0\"> " +
					"<a href=\"http://127.0.0.1:8899/html/car_my_homepage.html?" + item.user_id + "\" " +
					"target=\"_blank\" rel=\"opener\"> " +
					"<div class=\"avatar tw-rounded-full\" " +
					"style=\"display: inline-block; max-width: 100%; overflow: hidden; position: relative; z-index: 0;\"> " +
					"<div " +
					"style=\"box-sizing: border-box; display: block; max-width: 100%;\"> " +
					"<img  " +
					"src=\"data:image/svg+xml;utf-8,<svg width=&quot;40&quot; height=&quot;40&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.1&quot;/>\" " +
					"aria-hidden=\"true\" role=\presentation\" " +
					"style=\"max-width: 100%; display: block; margin: 0px; border: none; padding: 0px;\"> " +
					"</div><img " +
					"src=\"http://120.48.47.144:8899/images/" + item.user_head_portrait_url + "\" " +
					"width=\"40\" height=\"40\" " +
					"style=\"position: absolute; inset: 0px; box-sizing: border-box; padding: 0px; border: none; margin: auto; display: block; width: 0px; height: 0px; min-width: 100%; max-width: 100%; min-height: 100%; max-height: 100%; object-fit: cover;\"> " +
					"</div> " +
					"</a></div> " +
					"<p title=\"" + item.user_name + "\" " +
					"class=\"jsx-1904556275 author-avatar_name__3ex3- name line-1\"> " +
					"<a href=\"http://127.0.0.1:8899/html/car_my_homepage.html?" + item.user_id + "\" " +
					"target=\"_blank\" rel=\"opener\">" + item.user_name + "</a></p> " +
					"</div> " +
					"</div> " +
					"<h3 " +
					"class=\"tw-leading-22 tw-text-16 tw-font-medium tw-text-common-black tw-text-justify line-2 g-active-link-text tw-mt-36\"> " +
					"<a href=\"http://127.0.0.1:8899/html/car_video_broadcast.html?" + item
					.video_id + "\" target=\"_blank\" " +
					"class=\"jsx-1095092229\" rel=\"opener\">" + item.video_introduction + "</a> " +
					"</h3> " +
					"<p class=\"tw-mt-8 tw-h-20 tw-lead tw-text-common-gray tw-text-14\"><a href=\"http://127.0.0.1:8899/html/car_video_broadcast.html?" +
					item
					.video_id + "\" target=\"_blank\” " +
					"class=\"jsx-1095092229\" rel=\"opener\"><span " +
					"class=\"tw-mr-8\">" +
					(item.video_broadcast_count < 10000 ? item.video_broadcast_count : (item
						.video_broadcast_count / 10000).toFixed(2) + "万") +
					"次播放</span><span>" + item.video_upload_date + "</span></a></p></div></div>";
			});
			all_relevent_video_data += "</section></div>";
			$("[name='solr_content']").next().text("的相关视频");
			$("#all_search_data").append(all_relevent_video_data);
		}, "json");
}

/* 切换搜索类型 */
function switch_search_type(index) { //类型索引

	$("#all_search_data div").remove();
	page_index = 1;
	load_leng = 1200;
	if (index == 0) {
		search_type = "information";
		search_relevant_information(false);
	} else if (index == 1) {
		search_type = "car_series";
		search_relevent_car_series(false);
	} else {
		search_type = "video";
		search_relevent_video(false);
	}
}

/* 查询销量排行榜 */
function select_sales_all_series() {
	$.post("http://127.0.0.1:8899/api/consumer/Car_seriesController/select_sales_all_series/1/0/0/0/0/0", function(
		data) {
		var all_sales_data = "";
		$(data.select_sales_all_series.rankingList).each(function(index, item) {
			all_sales_data +=
				"<a target=\"_blank\" href=\"http://127.0.0.1:8899/html/car_series_index.html?" + item
				.car_series_id + "\" " +
				"data - log - click = \"{&quot;event&quot;:&quot;clk_event&quot;,&quot;params&quot;:{&quot;event_id&quot;:&quot;aladdin_not_sale_rank_card_item&quot;,&quot;car_series_id&quot;:&quot;4499&quot;,&quot;car_series_name&quot;:&quot;五菱宏光MINIEV&quot;,&quot;page_id&quot;:&quot;page_search_result_new&quot;,&quot;search_req_id&quot;:&quot;202207101333090102091481541EBE6A19&quot;,&quot;search_scene&quot;:&quot;normal_user&quot;,&quot;rank&quot;:&quot;0&quot;,&quot;aladdin&quot;:&quot;&quot;,&quot;cell_type&quot;:&quot;&quot;,&quot;cell_source&quot;:&quot;&quot;,&quot;query_content&quot;:&quot;哈哈&quot;,&quot;sub_tab&quot;:&quot;综合&quot;}}\" " +
				"class=\"jsx-559347778 rank-item\"> " +
				"<div class=\"jsx-559347778 img-cover\"> " +
				"<div style=\"display:inline-block;max-width:100%;overflow:hidden;position:relative;z-index:0\" " +
				"class=\"series-img\"> " +
				"<div style=\"box-sizing:border-box;display:block;max-width:100%\"><img " +
				"style=\"max-width:100%;display:block;margin:0;border:none;padding:0\" " +
				"src=\"data:image/svg+xml;utf-8,&lt;svg width=&quot;80&quot; height=&quot;54&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.1&quot;/&gt;\" " +
				"aria-hidden=\"true\" role=\"presentation\" /></div><noscript><img " +
				"src=\"//p3.dcarimg.com/img/motor-img/6efbde874de291b8176fa27814b9bef3~160x0.png\" " +
				"alt=\"" + item.car_series_name + "\" width=\"80\" height=\"54\" " +
				"style=\"position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover\" /></noscript><img " +
				"src=\"http://120.48.47.144:8899/images/" + item.car_series_images_url_1 + "\" " +
				"alt=\"" + item.car_series_name + "\" width=\"80\" height=\"54\" " +
				"style=\"position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover\" " +
				"class=\"zoom\" /> " +
				"</div> " +
				"<div class=\"jsx-559347778 number top-three-bg first\"><span " +
				"class=\"jsx-559347778 text\">" + (index + 1) + "</span></div> " +
				"</div> " +
				"<div class=\"jsx-559347778 trend-icon-wapper\"><img alt=\"icon\" " +
				"src=\"https://sf1-ttcdn-tos.pstatp.com/obj/motor-img/c2c19340cd01817f3026ed1041b6a2cf\" " +
				"class=\"jsx-559347778 icon\" /><span class=\"jsx-559347778 num\"></span> " +
				"</div> " +
				"<div class=\"jsx-559347778 info\"> " +
				"<div class=\"jsx-559347778 name\">" + item.car_series_name + "</div> " +
				"<div class=\"jsx-559347778 price\">" + item.min_manufacturer_price + "-" + item
				.max_manufacturer_price + "万</div> " +
				"</div> " +
				"<div class=\"jsx-559347778 sale\"><span " +
				"class=\"jsx-559347778 sale-total\">" + (item.sales.sales_count < 10000 ? item.sales
					.sales_count : (item.sales.sales_count / 10000).toFixed(2) + "万") +
				"</span><span " +
				"class=\"jsx-559347778 text\">全国销量</span></div> " +
				"</a>";
		});
		$("#all_sales_data").append(all_sales_data);
	}, "json");
}

/* 懒加载刷新页面 */
window.onscroll = function() {
	var scroll_top = document.body.scrollTop || document.documentElement.scrollTop;
	var win_top = window.innerHeight;
	if (scroll_top + win_top > load_leng && page_index != pages) {
		page_index++;
		if (search_type == "information") {
			search_relevant_information(false);
		} else if (search_type == "car_series") {
			search_relevent_car_series(false);
		} else {
			search_relevent_video(false);
		}
		load_leng += 1000;
	}
}
